<html>
    <head>
        <title>Diagnostics Helper</title>
        <style>
        </style>
    </head>
    <body>
        <div id="howto" class="howto">
            <h1>How to use this file</h1>
            <p class="howto-text">
            Here will go a description on how to use this file.</p>

        </div>
        <div id="toc" class="toc">
            <h1>Table of Contents:</h1>
            <ol>
                {% for category_name1 in result %}
                {% set category1 = result[category_name1] %}
                <li>
                <a href="#category-{{ loop.index }}">{{ category_name1 }}</a>
                <ol>
                    {% for diag_name1 in category1 %}
                    {% set diag1 = category1[diag_name1] %}
                    <li><a href="#diag-{{ diag1['diag_id'] }}">{{ diag1['title'] }}</a></li>
                    {% endfor%}
                </ol>
                </li>
                {% endfor %}
            </ol>
        </div>

        <h2>Diagnostic Results:</h2>
        {% for category_name in result %}
        {% set category = result[category_name] %}
        <div id="category-{{ loop.index }}" class="category-body">
            <h2><a name="category_name">{{ category_name }}</a></h2>
            {% for diag_name in category %}
            {% set diag = category[diag_name] %}
            <div id="diag-{{ diag['diag_id'] }}" class="diag-result">

                <h3 class="diag-title"><a name="diag-{{ diag['diag_id'] }}">{{ diag['title'] }}</a></h3>
                <p class="diag-description">Description: {{ diag['description'] }}</p>
                <p class="diag-result">Result: {{ diag['result'] }}</p>
                <p class="diag-toggle-output">Show/Hide Output</p>
                <p class="diag-output" id="diag-out">
            <pre>{{ diag['output']|e }}</pre>
                </p>
            </div>
            {% endfor %}
            {% endfor %}
        </div><!-- Category Body --!>
    </body>
</html>
